﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AppPort;
using Controllers;

namespace TI_App
{
    /// <summary>
    /// Summary description for ReportPort
    /// </summary>
    public class ReportPort : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            var p = ((MongoDB.Securety.MongoMembershipProvider)System.Web.Security.Membership.Provider);

            AppPortConveyor service = new AppPortConveyor(
                                                           p.getCurrentConnectionString(),
                                                           context,
                                                           ControllerFactory.GetReportController()
                                                          );
            service.ProcessRequest();

        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}